package com.veryside_ard;

import android.app.Application;
import android.util.Log;

import com.facebook.react.ReactApplication;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.imagepicker.ImagePickerPackage;
import cn.reactnative.httpcache.HttpCachePackage;
import cn.reactnative.modules.qq.QQPackage;
import cn.reactnative.modules.wx.WeChatPackage;
import cn.reactnative.modules.weibo.WeiboPackage;
import com.learnium.RNDeviceInfo.RNDeviceInfo;
import com.brentvatne.react.ReactVideoPackage;
import com.reactnative.photoview.PhotoViewPackage;
import com.RNFetchBlob.RNFetchBlobPackage;
import com.liuchungui.react_native_umeng_push.UmengPushPackage;
import com.liuchungui.react_native_umeng_push.UmengPushApplication;

import java.util.Arrays;
import java.util.List;

import com.github.yamill.orientation.OrientationPackage;

public class MainApplication extends UmengPushApplication implements ReactApplication {

  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
    @Override
    protected boolean getUseDeveloperSupport() {
      return BuildConfig.DEBUG;
    }

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
          new ImagePickerPackage(),
          new HttpCachePackage(),
          new QQPackage(),
          new WeChatPackage(),
          new UmengPushPackage(),
          new WeiboPackage(),
          new UmengReactPackage(),
          new RNDeviceInfo(),
          new ReactVideoPackage(),
          new OrientationPackage(),
          new RNFetchBlobPackage(),
          new PhotoViewPackage()
      );
    }


  };

  @Override
  public ReactNativeHost getReactNativeHost() {
      return mReactNativeHost;
  }
}
